﻿using System;
using System.Collections.Generic;
using ExFlash.Actions;

namespace ExFlash.Tags
{
    public class DoActionTag : Tag
    {
        private int mSwfVersion;

        public List<ActionRecord> Actions
        {
            get;
            private set;
        }

        public DoActionTag(int len, int version, Int32 offset)
            : base(TagCodes.DoAction, len, offset)
        {
            mSwfVersion = version;
        }

        public override void SwfDeserialize(BinaryBitReader reader)
        {
            long StartIndex = reader.Position;
            
            Actions = ActionAssistant.GetActions(reader, mSwfVersion);
        }

        public override void SwfSerialize(byte[] arr, ref int offset)
        {
            throw new NotImplementedException();
        }
    }
}
